home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / boot / czesc_2 / patchos / patch2.0.doc < prev    next >
Text File  |  1992-08-04  |  18KB  |  381 lines

  1.  
  2.  
  3.  
  4.  
  5.    PPPPPPP    AAAAAA   TTTTTTTT   CCCCCC   HH    HH   222222         000000
  6.    PP    PP  AA    AA     TT     CC    CC  HH    HH  22    22       00    00
  7.    PP    PP  AA    AA     TT     CC        HH    HH        22       00    00
  8.    PP    PP  AA    AA     TT     CC        HH    HH       22        00    00
  9.    PPPPPPP   AAAAAAAA     TT     CC        HHHHHHHH      22         00    00
  10.    PP        AA    AA     TT     CC        HH    HH     22          00    00
  11.    PP        AA    AA     TT     CC        HH    HH    22      ...  00    00
  12.    PP        AA    AA     TT     CC    CC  HH    HH   22       ...  00    00
  13.    PP        AA    AA     TT      CCCCCC   HH    HH  22222222  ...   000000
  14.  
  15.  
  16.  
  17.                                 © June 1992 by
  18.                           Bernstein Zirkel Softworks
  19.                                c/o Hartmut Stein
  20.                                 Koelner Str. 7
  21.                          W-5090 Leverkusen 3 - Opladen
  22.                                  West-Germany
  23.  
  24.  
  25.  
  26.  
  27.      1. A short introduction
  28.      -----------------------
  29.  
  30.         Whow!   There it is, your brand new A(500+|600|3000|whatever with
  31.      OS  2.xx) and it's just looking great!  A nice looking 3-dimensional
  32.      graphics   design,   a  sharp  dressed  Workbench  and  hundreds  of
  33.      fascinating new functions in the OS.
  34.  
  35.         But  after  some hours of work (editing, compiling etc., not just
  36.      clicking  icons on the Workbench) I discovered that there were a few
  37.      things missing on my A3000.  Since I couldn't find a solution for my
  38.      problems  in  the usual mouse- and Intuition-programs (like MachIV -
  39.      which  I  use  currently  -  or  all the others), I decided to write
  40.      Patch2.0.   The  program  enhances  OS 2.04 or higher with three new
  41.      features.
  42.  
  43.  
  44.      2. Menu-shortcuts
  45.      -----------------
  46.  
  47.         The  first  new  (or  old?)  feature  are  keyboard-shortcuts for
  48.      menu-items.  You may think now 'What is he going to tell me?  I just
  49.      CAN  use menu-shortcuts with the right amiga key!' That's right, but
  50.      did you ever try this with an active string-gadget?  Under OS 1.3 it
  51.      works  well:   you just hit right amiga together with the proper key
  52.      and Intuition sends this to your program as a menu-selection.  Under
  53.      OS  2.0  this  IS  a  problem,  since  Intuition totally ignores the
  54.      menu-shortcuts, when a string-gadget is active, and just inserts the
  55.      key  into  the gadget.  This seems to be a really strange idea witch
  56.      makes no sense at all and makes you grab your mouse permanently.  As
  57.      an  example  let's  have  a look at the editor CygnusEd (which I use
  58.      currently and like very much):
  59.  
  60.         If  you  want  to search a string, CygnusED opens up a new window
  61.      with  some toggle buttons ('upper case == lower case', 'wild cards',
  62.      etc.) and a string-gadget, which is automatically activated.  So you
  63.      can  type in the search string without having to activate the gadget
  64.      manually.   The  window  also  has  a menu attached ('leave search',
  65.      'toggle  upper  case  ==  lower case', 'toggle wild cards', ...), of
  66.      which  the  items can also be accessed via shortcuts ('l' for leave,
  67.      'c'  for  toogle case, 'w' for wild cards, ...).  So there are three
  68.      different  ways  to  change  for example the case sensitivity of the
  69.      text search:
  70.  
  71.         a) grab your mouse and click the gadget
  72.         b) grab your mouse and choose the menu-item
  73.         c) grab your keyboard and press right-amiga-c
  74.  
  75.         Under  OS  1.3  I  absolutely  prefered the third method, since I
  76.      needn't  remove  my fingers from the keyboard.  But what's happening
  77.      under OS 2.0?  When I press this combination while the string-gadget
  78.      is  active,  Intuition  just inserts a 'c' into the string!  Hahaha,
  79.      that's a really funny idea commodore had...
  80.  
  81.         This  problem  does  not  only  belong to CygnusED, it appears in
  82.      every   program   which  offers  string-gadgets  and  menu-shortcuts
  83.      together in the same window.
  84.  
  85.         When Patch2.0 is installed, the program checks all input from the
  86.      keyboard.   If  it finds a key pressed in combination with the right
  87.      amiga  key,  it takes a look at the actual window.  When it finds an
  88.      active string gadget and a menu bar, which contains an item with the
  89.      pressed  key as a shortcut, it sends a menu-selection-message to the
  90.      appropriate  program,  thus  bypassing  Intuition's  strange  way of
  91.      handling menu-shortcuts!
  92.  
  93.  
  94.      3. Use the '*' in pattern matching
  95.      ----------------------------------
  96.  
  97.         Under  OS  1.3 I used the APR Shell commands, which allowed me to
  98.      use  the  '*'  instead  of  the  '#?'.   The OS 2.0 pattern matching
  99.      functions  of  the dos.library also can understand the '*', but it's
  100.      needless to say that this nice little feature is disabled by default
  101.      and  that  there  is  no  possibility  to  enable  it  in one of the
  102.      different preferences editors.
  103.  
  104.         Patch2.0  gives  you  full  control  over  this  pattern matching
  105.      facility.
  106.  
  107.         Since  the '*' normally stands for the actual shell window, it is
  108.      not 100% compatible to the '#?' pattern.  For example 'Copy * RAM:X'
  109.      won't  copy  all  files  from  the actual directory to the directory
  110.      'RAM:X',  it just copies all lines of text you now enter into a file
  111.      named 'RAM:X'.  This problem only appears when you use a single star
  112.      as  a  pathname.   That  means  that  you can type 'Copy Work:Data/*
  113.      RAM:X'  or  'Copy *.c RAM:X'.  A very easy solution for this problem
  114.      is  to  use  the  '**'  pattern  which means exactly the same and is
  115.      accepted as a normal pattern.
  116.  
  117.  
  118.      4. Insert Chars by typing their ASCII-code
  119.      ------------------------------------------
  120.  
  121.         On  MS-DOS-PCs  I  found  one  feature  I  missed  on the Amiga -
  122.      insertion  of  any character by entering its ascii-equivalent on the
  123.      numeric  pad  in  combination  with the control key (that's the only
  124.      feature of PCs I miss on the Amiga ...  by the way:  Do you know how
  125.      to  create  a  large program on any computer with an INTEL processor
  126.      inside  -  like  'Windows'  on  MS-DOS-PCs?  Well, that's very easy.
  127.      Just  take  some  apes - a million or two, or a bit more - and place
  128.      them  together  in  a  large,  large room.  Then give every ape a PC
  129.      (there  are  people who say that just every real ape on earth owns a
  130.      PC, but I can't agree with this).  After that, close the door of the
  131.      large,  large  room and wait a bit - let's say, one eternity or two.
  132.      Then  visit the room again and there it is - 'Windows' for PCs!  Now
  133.      you  know what 'INTEL' is the abbreviation for:  'INfinite Terror of
  134.      apE Legions'.  Now can you imagine what 'IBM' could mean?).
  135.  
  136.         Patch2.0  checks the input stream for any keys on the numeric pad
  137.      pressed  together  with the control key.  If it finds some of those,
  138.      it  converts  them to the appropriate ASCII-character.  This is very
  139.      useful  when  inserting some special characters (which are difficult
  140.      to  find  on  the  keyboard,  like  '©'  or 'ª') into a text or when
  141.      searching  for some special ASCII-values like for example 155, which
  142.      is  known as the 'Control Sequence Introduce' of the console.device.
  143.      As  mentioned  above,  CygnusED  (and  all other editors I know) use
  144.      string-gadgets  for entering a search-string.  Since you can't enter
  145.      a ACII-code like 155 on the keyboard, you can't search for it.  When
  146.      Patch2.0  is active, this is not longer a problem (be sure to switch
  147.      the  'Text  gadget  filter' in the IControl-preferences-editor off).
  148.      Just  activate  the  search  option,  press the control key and type
  149.      '155' on the numeric pad - that's it!
  150.  
  151.  
  152.      5. Installation
  153.      ---------------
  154.  
  155.         Patch2.0  consists  of two parts:  the program 'Patch2.0' itself,
  156.      which  can  be  placed  anywhere, and the handler 'Patch2.0Handler',
  157.      which must be placed in the 'L:'-directory.
  158.  
  159.         Workbench-Users  should  click  the  'InstallHandler'-Icon, which
  160.      copies  the  Handler to the desired directory.  Then you should move
  161.      'Patch2.0'  to  the 'WBStartup'-directory of your 'WB_2.x'-disk.  In
  162.      this  case  the program will be started automatically every time you
  163.      start  or  reboot the amiga.  To stop the program (if it should ever
  164.      be necessary) just double click on it.
  165.  
  166.         Shell-Users can use the InstallHandler-Skript to copy the Handler
  167.      to  the  'L:'-directory  (or just the 'Copy'-command...).  Then copy
  168.      'Patch2.0'  to  your  'C:'-directory  and  insert  a  line  in  your
  169.      startup-sequence,  which  will start Patch2.0 automatically on every
  170.      start  or  reboot  of the amiga.  You don't need 'Run' or 'RunBack',
  171.      since  it  just  installs  the  handler  in  the background and then
  172.      returns to the Shell.  To stop the program just start it again.
  173.  
  174.  
  175.      6. Options
  176.      ----------
  177.  
  178.         There  are  lots  of  options  which  control  the  behaviour  of
  179.      Patch2.0.   In  the  normal  case  you  don't  need any of those, so
  180.      Patch2.0 will work completely as stated above.
  181.  
  182.         The  options  are  valid  for  both  Workbench-  and Shell-users.
  183.      Workbench-users  can  enter the options as tooltypes (have a look at
  184.      your   Workbench-manual   for  more  information  about  tooltypes),
  185.      Shell-users  enter  the  options  as usual after the command's name.
  186.      Upper  and lower case are ignored.  When started from the Shell with
  187.      a  '?' as the only argument, you will get a help string in the usual
  188.      format  for  Shell  commands  (look  at  the  Shell  manual for more
  189.      information).
  190.  
  191.      On
  192.         Install Patch2.0
  193.  
  194.      Off
  195.         Remove Patch2.0.  If neither 'On' nor 'Off' are given, the actual
  196.         state  of  the  program  is inverted (that means:  if it was off,
  197.         switch it on, otherwise switch it off).
  198.  
  199.      Quiet
  200.         Normally   Patch2.0   shows  you  a  requester  saying  'Patch2.0
  201.         installed' on startup.  This option diables the requester.
  202.  
  203.      Usage
  204.         Show  a  requester  with  short  explanations  for  the different
  205.         options (better have a look at this file!).
  206.  
  207.      MenuOff
  208.         Disable  the  interception  of  menu-shortcuts;  you get the same
  209.         silly behaviour as without Patch2.0!
  210.  
  211.      AsciiOff
  212.         Disable  the  ASCII-input  via  the  numeric  pad (to remove this
  213.         PC-feeling from your Amiga).
  214.  
  215.      PatternOff
  216.         The '*' as replacement for the '#?'-pattern is enabled by setting
  217.         a  specified  flag  in  one  of the dos.library's data structures
  218.         (sorry,  but  there  is  no  function  for  this in the library).
  219.         Normally  Patch2.0  sets  this  flag,  if you enable the '*', and
  220.         clears  it,  if  you  disable it.  So if another program wants to
  221.         manipulate the flag, it will be overwritten by Patch2.0.  If this
  222.         turns  out  to  be  a  problem,  you  should specify this option.
  223.         Patch2.0 will then never touch this flag.
  224.  
  225.      StarOff
  226.         Disable the '*' in pattern matching.
  227.  
  228.      Qualifier=nnn
  229.         'nnn'   is   a  decimal  number  which  describes  the  qualifier
  230.         (qualifiers  are:   control,  caps  lock,  shift, alt, amiga) for
  231.         ASCII-input  via  the  numeric pad (defaults to the control key).
  232.         The qualifiers have the following values:
  233.            Left Shift  1
  234.            Right Shift 2
  235.            Caps Lock   4
  236.            Control     8
  237.            Left Alt    16
  238.            Right Alt   32
  239.            Left Amiga  64
  240.            Right Amiga 128
  241.         If  you  want  a  combination  of  qualifiers  you simply add the
  242.         values.
  243.  
  244.      Cx_Priority=nnn
  245.         The  decimal  number  'nnn'  specifies the priority of Patch2.0's
  246.         inputhandler.
  247.  
  248.      Cx_PopUp=yes|no
  249.         Please  enter either 'yes' or 'no' for this option.  In the first
  250.         case Patch2.0 will automatically open its commodity window, where
  251.         you can adjust all the settings by the use of gadgets.
  252.  
  253.  
  254.      7. Some examples
  255.      ----------------
  256.  
  257.      This are some examples for how to start Patch2.0 from the shell.  To
  258.      use  the  examples  from  the workbench just enter every option as a
  259.      single tool type in Patch2.0's info-window.
  260.  
  261.      Patch2.0 On PatternOff 
  262.         Start  Patch2.0  (or give an error message if it's just running).
  263.         The  pattern matching flag of dos.library will not be affected at
  264.         all.
  265.  
  266.      Patch2.0 Off
  267.         Stop  Patch2.0  (or  give  an  error message if it wasn't running
  268.         yet).
  269.  
  270.      Patch2.0 Qualifier=17 CX_Priority=100
  271.         Use  the  combination  of  the left shift and the left alt key to
  272.         insert  ASCII  chars  via  the  numeric pad.  The inputhandler is
  273.         inserted at a priority of 100.
  274.  
  275.      Patch2.0 On CX_PopUp=Yes
  276.         Start Patch2.0 (if it wasn't running yet) and open up the control
  277.         window.
  278.  
  279.  
  280.      8. Commodities
  281.      --------------
  282.  
  283.         Patch2.0  can be controlled via the Commodities Exchange tool you
  284.      find  on your Workbench disk.  It may be freely enabled, disabled or
  285.      killed.   When  you  use  the  'Show'-Button  (or the 'Cx_PopUp=yes'
  286.      option  an  startup)  Patch2.0  opens a special window where you can
  287.      control all the programs features.
  288.  
  289.         At  the  top of the window you find four gadgets which correspond
  290.      to  the four '...Off'-options explained above.  Use these gadgets to
  291.      toggle  the features of Patch2.0 on or off.  If a gadget is checked,
  292.      the feature is turned on.
  293.  
  294.         In the field below the features you can adjust the qualifiers for
  295.      ASCII-input by hilighting the desired buttons.
  296.  
  297.         At  the  bottom  of  the  window  you find three gadgets:  'Hide'
  298.      closes  the  window,  keeping Patch2.0 still in memory, while 'Quit'
  299.      closes  the  window and removes the program.  The third button 'Save
  300.      to  Icon'  is  only  available  when  the  program  was started from
  301.      Workbench.   In  this  case  you  can  save  the  actual settings as
  302.      tooltypes  to  Patch2.0's  icon,  so they will by active on the next
  303.      start of the program.  There's no service like this for Shell-users;
  304.      you  have  to  type  it  to  the  command  line by yourself (I think
  305.      Shell-users like typing, so this should be no problem for you...).
  306.  
  307.  
  308.      9. Caveats
  309.      ----------
  310.  
  311.         Though  I  used  this  program  for  a  couple  of  weeks without
  312.      problems,  there  may be any number of lurking bugs in it.  So if it
  313.      low-level-formats  your  harddisk,  makes  your monitor explode into
  314.      lots  of  little  pieces,  gobbles  down  your cat or drinks all the
  315.      liquid  from  your neighbour's aquarium, making his goldfish gasping
  316.      for water - please don't blame it on me!
  317.  
  318.         7236  bytes  of  disk space seem to be a bit more then needed for
  319.      such  a  program like Patch2.0.  More than 50 % of this (57% or 4140
  320.      byte)  are  used  to manage the commodity window.  If you don't need
  321.      this  and  want  to use the smaller version you can order it from me
  322.      (see below).
  323.  
  324.         Following  this  comes some legal stuff which sounds very well to
  325.      me.   I took it from the readme file for Arq, which is a very, very,
  326.      very  good  and  useful  program.   Hi,  Martin,  if  you would have
  327.      mentioned  your adress in this file, I would have sent you something
  328.      for  your  work.   But,  maybe, you will find Patch2.0 a bit useful,
  329.      too...
  330.  
  331.  
  332.      10. Legal Stuff
  333.      ---------------
  334.  
  335.         The  author  will  not  be liable for any damage arising from the
  336.      failure  of this program to perform as described, or any destruction
  337.      of other programs or data residing on a system attempting to run the
  338.      program.   While the author knows of no damaging errors, the user of
  339.      this program uses it at his or her own risk.
  340.  
  341.  
  342.      11. Other Stuff
  343.      ---------------
  344.  
  345.         This  code  and documentation are freely distributable and may be
  346.      used,  copied,  modified, fed to your dog or whatever you like to do
  347.      with  it.  It would be nice not to remove this text when copying the
  348.      program,  so  other  people  will  also  be  able  to understand its
  349.      meaning.
  350.  
  351.         If  you  have any questions, have ideas for special improvements,
  352.      want  to  have  a  look  at  the  sources  of  the  program  (rather
  353.      undocumented,  I'm  afraid), want to order the smaller version or if
  354.      you just want to thank me for this wonderful little tool, you should
  355.      send me some money (or other valuables), a self-adressed and stamped
  356.      envelope  (if  you  want response) and a empty disk (if you want the
  357.      sources).
  358.  
  359.      Patch2.0  was  programmed  using  the  Aztec C 5.2a compiler, but it
  360.      should be compilable with any of the Aztec compilers.
  361.  
  362.  
  363.      12. An Apology
  364.      --------------
  365.  
  366.      I'm  afraid  I  have  to  apologize  for the sometimes extremly poor
  367.      quality  of  this  writing.  When I left school, my English was very
  368.      bad.   Since  then I improved it a little bit by reading, re-reading
  369.      and  re-re-reading  the  english  Rom Kernel Reference Manuals for a
  370.      long  time  and  also placing them under my pillow to absorb them by
  371.      osmosis  (this  joke © by Randell Jesup).  I also tried this with my
  372.      AmigaDOS  manuals,  but that gave me extremly horrible nightmares of
  373.      terrible  red monsters, at least ten foot tall, stalking me from the
  374.      back  while I was sitting at my computer trying to program something
  375.      useful  in  combination  with  the dos, with the four green flashing
  376.      letters  of  'BCPL' on their chests and trying to beat me with their
  377.      enormous  global  vectors.  I woke up crying and all my sheets soken
  378.      wet and I never tried this again...
  379.  
  380.  
  381.